@rem
@rem ----------------------------------------------------------------------------
@rem  MailClientSdk init script for Windows, version 1.0.0
@rem  usage: 
@rem  cd .\tools 
@rem  .\buildSdk.bat
@rem 
@rem ----------------------------------------------------------------------------
@rem
@echo off

if exist "..\build_essential\mail_client_sdk" (
  rmdir /s /q "..\build_essential\mail_client_sdk"
)

xcopy "..\mail_client_sdk\" "..\build_essential\mail_client_sdk\" /E /Q

@rem 准备build
@rem 路径相对于sdk目录
cd ..\build_essential\
set TEMP_PATH=".\mail_client_sdk\build\default\outputs\default\mail_client_sdk.har"
@rem sdk目录如果不存在,需要创建先.
if not exist "..\sample\sdk" (
  mkdir "..\sample\sdk"
)
set OUTPUT_PATH="..\sample\sdk\mail_client_sdk.har"

@rem 编译mail_client_sdk模块
echo building...
call .\hvigorw.bat --mode module -p module=mail_client_sdk assembleHar

@REM 回到tools目录
cd ..\tools\
